﻿using System;
using System.Collections.Generic;

using Fuse8.DomainFramework.Domain;

namespace Fuse8.ContentManagementFramework.SystemFacade.Workflow
{
    public interface ICmsWorkflowStorageService<TEntity, TKey>
        where TEntity : class, IEntityObject<TKey>
        where TKey : IComparable<TKey>, IEquatable<TKey>
    {
        void Create(TEntity entity, DateTime? approvalDeadline, DateTime? reviewDeadline);

        CmsWorkflowState Load(TEntity entity, IEnumerable<CmsWorkflowState> allWorkflowStates);

        void Save(TEntity entity, CmsWorkflowState workflowState);

        void Delete(TEntity entity);
    }
}
